<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="/layui-v2.7.2/layui/css/layui.css">
    <script src="/layui-v2.7.2/layui/layui.js"></script>

</head>

<body>
    <div class="layui-container">
        <a href="/addClass" class="layui-btn">添加</a>
        <table class="layui-table">
            <thead>
                <tr>
                    <th>班级编号</th>
                    <th>班级名称</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                {{ each data.list value index }}
                <tr>
                    <td>{{ value.id }}</td>
                    <td>{{ value.name }}</td>
                    <td>
                        <a class="layui-btn" href="/edit?id={{ value.id }}">修改</a>
                        <a class="layui-btn layui-btn-danger" href="/delClass?id={{ value.id }}">删除</a>
                    </td>
                </tr>
                {{ /each }}
            </tbody>
        </table>
       
    </div>
</body>

</html>